package dps;

import java.util.UUID;

import dps.Vote.VoteType;

public class Poll {
    public UUID pollId;
    public String strPollParam;
    public double pollVoteYes;
    public double pollVoteNo;
    public double pollVoteNoResponse;
    public boolean IsEmpty;
    
    public VoteType getMajority() {
        if( pollVoteYes > pollVoteNo && pollVoteYes > pollVoteNoResponse)
            return VoteType.YES;

        if( pollVoteNo > pollVoteYes && pollVoteNo > pollVoteNoResponse)
        	return VoteType.NO;

        if( pollVoteNoResponse > pollVoteNo && pollVoteNoResponse > pollVoteYes)
        	return VoteType.NoResponse;
        
		return VoteType.Unknown;
    }
}
